<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/Usuario/templateUsuario.xhtml">
	<ui:define name="conteudo">
		<p:messages/>
		<h:inputHidden value="#{controladorReserva.reserva.id}"/>
		<h:panelGrid columns="2" cellpadding="10">
		
			<p:outputLabel value="#{msg['reserva.usuario.nome']}"/>
			<p:inputText value="#{controladorReserva.reserva.usuario.nome}" required="true" >
			</p:inputText>
			
			<p:outputLabel value="#{msg['reserva.recurso.nome']}"/>
			<p:inputText value="#{controladorReserva.reserva.recurso.nome}" required="true" >
			</p:inputText>
		
			<p:outputLabel value="#{msg['reserva.data']} *"/>
			<p:calendar value="#{controladorReserva.reserva.data}" id="popupCal" required="true" label="#{msg['reserva.data']}" requiredMessage="Necessario data para reservar o recurso" /> 
		
			<p:outputLabel value="#{msg['reserva.horario.inicio']} *"/>
			<p:calendar value="#{controladorReserva.reserva.horarioInicio}" pattern="HH:mm" timeOnly="true" required="true" label="#{msg['reserva.horario']}" requiredMessage="Necessario horario para reservar o recurso" />	
			
			<p:outputLabel value="#{msg['reserva.horario.fim']} *"/>
			<p:calendar value="#{controladorReserva.reserva.horarioFim}" pattern="HH:mm" timeOnly="true" required="true" label="#{msg['reserva.horario']}" requiredMessage="Necessario horario para reservar o recurso" />	
			
			<h:form>
				<p:commandButton ajax="false" type="submit" value="#{msg['botao.atualizar']}" action="#{controladorReserva.editar}"/>
				<p:commandButton ajax="false" type="submit" immediate="true" value="#{msg['botao.voltar']}" action="/Usuario/listarReservasUsuario.xhtml"/>
			</h:form>
		</h:panelGrid>
</ui:define>
</ui:composition>
</html>
